<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>键盘</title>
</head>

<body>
  <!-- <input class="inp" > -->
  <div class='inp'></div>
  <div class="keyboard"></div>
  <button onclick='reset()'>重置</button>
  <button onclick='show()'>显示</button>
  <!-- <script src="./keyboard.js"></script> -->
  <script src="../lib/index.js"></script>
  <script>
    var keyBorad = new Keyboard({
      boxName: ".keyboard",
      // writeBoxName: ".inp",
      entryInputNa: ".inp",
      pageVehicleSplit: "鄂j401",
      pushCh: ['中', '国', '加', "油"],
      pushEn: ['1'],
      enabledEn: ['O', 'j'],
      externalKeyboard: true,//是否启用自己的键盘
      backpaceEventFn: function () {
        console.log("backpaceEventFn=>删除事件的回调")
        console.log(keyBorad.getVehicleValue());
      }
    });
    keyBorad.init();
    function reset() {
      keyBorad.initValue();
    }

    document.onclick = function () {
      keyBorad.keyboardHide();
    }
    function show(event) {
      keyBorad.keyboardShow();
      window.event ? window.event.cancelBubble = true : e.stopPropagation();
    }
  </script>
</body>

</html>